image:
  es:
    repository: quay.io/pires/docker-elasticsearch-kubernetes
    tag: 6.3.2
    pullPolicy: Always
  init:
    repository: busybox
    tag: latest
    pullPolicy: IfNotPresent
  curator:
    repository: bobrik/curator
    tag: latest
    pullPolicy: IfNotPresent

common:
  # Defines the service type for all outward-facing (non-discovery) services.
  # For minikube use NodePort otherwise use LoadBalancer
  serviceType: LoadBalancer

  nodeSelector:
    infra: "true"

  env:
    CLUSTER_NAME: "myesdb"

    # Uncomment this if you get the "No up-and-running site-local (private)
    # addresses" error.
    # NETWORK_HOST: "_eth0_"

  # If enabled, then the data and master nodes will be StatefulSets with
  # associated persistent volume claims.
  stateful:
    enabled: true

    # The PVC storage class that backs the persistent volume claims. On AWS
    # "gp2" would be appropriate.
    class: "gp2"

# Client/ingest nodes can execute pre-processing pipelines, composed of
# one or more ingest processors. Depending on the type of operations performed
# by the ingest processors and the required resources, it may make sense to
# have dedicated ingest nodes, that will only perform this specific task.  
client:
  # It isn't common to need more than 2 client nodes.
  replicas: 1
  antiAffinity: "soft"

  # The amount of RAM allocated to the JVM heap. This should be set to the
  # same value as client.resources.requests.memory, or you may see
  # OutOfMemoryErrors on startup.
  heapMemory: 1024m

  resources:
    requests:
      memory: 1024Mi

  env:
    NODE_DATA: "false"
    NODE_MASTER: "false"
    NODE_INGEST: "true"
    HTTP_ENABLE: "true"

# Data nodes hold the shards that contain the documents you have indexed. Data
# nodes handle data related operations like CRUD, search, and aggregations. 
# These operations are I/O-, memory-, and CPU-intensive. It is important to 
# monitor these resources and to add more data nodes if they are overloaded.
#
# The main benefit of having dedicated data nodes is the separation of the 
# master and data roles.
data:
  # This count will depend on your data and computation needs.
  replicas: 2
  antiAffinity: "soft"

  # The amount of RAM allocated to the JVM heap. This should be set to the
  # same value as data.resources.requests.memory, or you may see
  # OutOfMemoryErrors on startup.
  heapMemory: 2048m

  resources:
    requests:
      memory: 2048Mi

  env:
    NODE_DATA: "true"
    NODE_MASTER: "false"
    NODE_INGEST: "false"
    HTTP_ENABLE: "false"

  # Determines the properties of the persistent volume claim associated with a
  # data node StatefulSet that is created when the common.stateful.enabled
  # attribute is true.
  stateful:
    # This is a default value, and will not be sufficient in a production
    # system. You'll probably want to increase it.
    size: 200Gi

# The master node is responsible for lightweight cluster-wide actions such as
# creating or deleting an index, tracking which nodes are part of the 
# cluster, and deciding which shards to allocate to which nodes. It is 
# important for cluster health to have a stable master node.
master:
  # Master replica count should be (#clients / 2) + 1, and generally at least 3.
  replicas: 3
  antiAffinity: "soft"
  
  # The amount of RAM allocated to the JVM heap. This should be set to the
  # same value as master.resources.requests.memory, or you may see
  # OutOfMemoryErrors on startup.
  heapMemory: 2048m

  resources:
    requests:
      memory: 2048Mi

  env:
    NODE_DATA: "false"
    NODE_MASTER: "true"
    NODE_INGEST: "false"
    HTTP_ENABLE: "false"
    
    # The default value for this environment variable is 2, meaning a cluster
    # will need a minimum of 2 master nodes to operate. If you have 3 masters
    # and one dies, the cluster still works.
    NUMBER_OF_MASTERS: "2"

  # Determines the properties of the persistent volume claim associated with a
  # data node StatefulSet that is created when the common.stateful.enabled
  # attribute is true.
  stateful:
    # This is a default value, and will not be sufficient in a production
    # system. You'll probably want to increase it.
    size: 30Gi

service:
  httpPort: 9200
  transportPort: 9300
      
